﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Data.Linq;
using System.Text;


namespace RoomReservationService2
{
    public class Linq2Sql
    {


        public static void F_002_set_data_Room_reserv(MyClasses.RoomReservation rs)
        {
            using (MyClasses.MikeDbDataContext Data = new MyClasses.MikeDbDataContext())
            {

                Data.RoomReservations.InsertOnSubmit(rs);
                Data.SubmitChanges();
            }

        }

        public static MyClasses.RoomReservation[] F_003_GetRums()
        {
            using (MyClasses.MikeDbDataContext Data = new MyClasses.MikeDbDataContext())
            {
                return (from p in Data.RoomReservations select p).ToArray();


            }


        }
    }
}
